package com.loozb.thread5.plus;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingDeque;

/**
 * 运算除法线程
 *
 * @author 龙召碧
 * @create 2018-02-11 13:15
 **/
public class Div implements Runnable {
    public static BlockingQueue<Msg> bq = new LinkedBlockingDeque<>();
    @Override
    public void run() {
        while (true) {
            try {
                Msg msg = bq.take();//获取数据
                msg.j = msg.i / 2;
                System.out.println(msg.orgStr + "=" + msg.i);

            } catch (InterruptedException e) {

            }
        }
    }
}
